package com.im.app.listener;

import com.alibaba.fastjson.JSONObject;
import org.jim.core.ImChannelContext;
import org.jim.core.exception.ImException;
import org.jim.core.packets.User;
import org.jim.server.JimServerAPI;
import org.jim.server.listener.AbstractImUserListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

public class ClientListener extends AbstractImUserListener {
    private static Logger logger = LoggerFactory.getLogger(ClientListener.class);
    @Override
    public void doAfterBind(ImChannelContext imChannelContext, User user) throws ImException {
//        List<ImChannelContext> byUserId = JimServerAPI.getByUserId(user.getUserId());
//        logger.info("用户上线:{},size : {}", user.getUserId(),byUserId.size());

    }

    @Override
    public void doAfterUnbind(ImChannelContext imChannelContext, User user) throws ImException {
//        logger.info("用户离线:{}", user.getUserId());
    }
}
